//
//  Modifiers.swift
//  BeautifulSwiftUI
//
//  Created by 移云 on 2020/7/29.
//  Copyright © 2020 MaoYeYeDeJiangCuCha. All rights reserved.
//

import SwiftUI

//双阴影
struct ShadowModifier:ViewModifier {
    func body(content: Content) -> some View {
        content
            .shadow(color: Color.black.opacity(0.1), radius: 10, x: 0, y: 12)
        .shadow(color: Color.black.opacity(0.1), radius: 1, x: 0, y: 1)
    }
}


//自定义字体
struct CustomFontModifier:ViewModifier {
    var size:CGFloat = 28
    
    func body(content: Content) -> some View {
        content.font(.custom("WorkSans-Bold", size: size))
    }
}


